home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 0a | 50 61 74 68 3a 20 69 6e |.lang.c.|Path: in|
|00000020| 31 2e 75 75 2e 6e 65 74 | 21 75 74 63 73 72 69 21 |1.uu.net|!utcsri!|
|00000030| 75 74 67 70 75 21 75 74 | 69 6e 66 6f 21 6e 65 77 |utgpu!ut|info!new|
|00000040| 73 0a 46 72 6f 6d 3a 20 | 44 61 72 72 65 6c 6c 20 |s.From: |Darrell |
|00000050| 47 72 61 69 6e 67 65 72 | 20 3c 64 61 72 72 65 6c |Grainger| <darrel|
|00000060| 6c 2e 67 72 61 69 6e 67 | 65 72 40 75 74 6f 72 6f |l.graing|er@utoro|
|00000070| 6e 74 6f 2e 63 61 3e 0a | 53 75 62 6a 65 63 74 3a |nto.ca>.|Subject:|
|00000080| 20 52 65 3a 20 48 45 4c | 50 21 20 46 69 6c 65 20 | Re: HEL|P! File |
|00000090| 50 6f 69 6e 74 65 72 73 | 0a 58 2d 4e 6e 74 70 2d |Pointers|.X-Nntp-|
|000000a0| 50 6f 73 74 69 6e 67 2d | 48 6f 73 74 3a 20 63 6f |Posting-|Host: co|
|000000b0| 61 67 75 6c 61 62 6c 65 | 2e 64 69 61 6c 69 6e 2e |agulable|.dialin.|
|000000c0| 75 74 6f 72 6f 6e 74 6f | 2e 63 61 0a 43 6f 6e 74 |utoronto|.ca.Cont|
|000000d0| 65 6e 74 2d 54 79 70 65 | 3a 20 74 65 78 74 2f 70 |ent-Type|: text/p|
|000000e0| 6c 61 69 6e 3b 20 63 68 | 61 72 73 65 74 3d 75 73 |lain; ch|arset=us|
|000000f0| 2d 61 73 63 69 69 0a 4d | 65 73 73 61 67 65 2d 49 |-ascii.M|essage-I|
|00000100| 44 3a 20 3c 44 4b 77 48 | 34 4b 2e 48 4d 74 40 75 |D: <DKwH|4K.HMt@u|
|00000110| 74 63 63 2e 75 74 6f 72 | 6f 6e 74 6f 2e 63 61 3e |tcc.utor|onto.ca>|
|00000120| 0a 54 6f 3a 20 72 6f 62 | 65 72 69 6e 6f 40 61 6f |.To: rob|erino@ao|
|00000130| 6c 2e 63 6f 6d 0a 53 65 | 6e 64 65 72 3a 20 6e 65 |l.com.Se|nder: ne|
|00000140| 77 73 40 75 74 63 63 2e | 75 74 6f 72 6f 6e 74 6f |ws@utcc.|utoronto|
|00000150| 2e 63 61 20 28 4e 65 77 | 73 29 0a 43 6f 6e 74 65 |.ca (New|s).Conte|
|00000160| 6e 74 2d 54 72 61 6e 73 | 66 65 72 2d 45 6e 63 6f |nt-Trans|fer-Enco|
|00000170| 64 69 6e 67 3a 20 37 62 | 69 74 0a 4f 72 67 61 6e |ding: 7b|it.Organ|
|00000180| 69 7a 61 74 69 6f 6e 3a | 20 55 54 43 43 20 43 61 |ization:| UTCC Ca|
|00000190| 6d 70 75 73 20 41 63 63 | 65 73 73 0a 52 65 66 65 |mpus Acc|ess.Refe|
|000001a0| 72 65 6e 63 65 73 3a 20 | 3c 34 63 73 72 34 63 24 |rences: |<4csr4c$|
|000001b0| 66 65 6d 40 6e 65 77 73 | 62 66 30 32 2e 6e 65 77 |fem@news|bf02.new|
|000001c0| 73 2e 61 6f 6c 2e 63 6f | 6d 3e 0a 4d 69 6d 65 2d |s.aol.co|m>.Mime-|
|000001d0| 56 65 72 73 69 6f 6e 3a | 20 31 2e 30 0a 44 61 74 |Version:| 1.0.Dat|
|000001e0| 65 3a 20 54 75 65 2c 20 | 39 20 4a 61 6e 20 31 39 |e: Tue, |9 Jan 19|
|000001f0| 39 36 20 30 36 3a 30 39 | 3a 35 36 20 47 4d 54 0a |96 06:09|:56 GMT.|
|00000200| 58 2d 4d 61 69 6c 65 72 | 3a 20 4d 6f 7a 69 6c 6c |X-Mailer|: Mozill|
|00000210| 61 20 31 2e 32 32 20 28 | 57 69 6e 64 6f 77 73 3b |a 1.22 (|Windows;|
|00000220| 20 49 3b 20 31 36 62 69 | 74 29 0a 0a 72 6f 62 65 | I; 16bi|t)..robe|
|00000230| 72 69 6e 6f 40 61 6f 6c | 2e 63 6f 6d 20 28 52 6f |rino@aol|.com (Ro|
|00000240| 62 65 72 69 6e 6f 29 20 | 77 72 6f 74 65 3a 0a 3e |berino) |wrote:.>|
|00000250| 49 20 61 6d 20 63 75 72 | 72 65 6e 74 6c 79 20 74 |I am cur|rently t|
|00000260| 72 79 69 6e 67 20 74 6f | 20 6b 65 65 70 20 6f 6e |rying to| keep on|
|00000270| 65 20 66 69 6c 65 20 6f | 70 65 6e 20 77 68 69 6c |e file o|pen whil|
|00000280| 65 20 6f 70 65 6e 69 6e | 67 20 6f 74 68 65 72 0a |e openin|g other.|
|00000290| 3e 66 69 6c 65 73 20 6f | 6e 65 20 61 74 20 61 20 |>files o|ne at a |
|000002a0| 74 69 6d 65 20 75 73 69 | 6e 67 20 61 20 73 65 70 |time usi|ng a sep|
|000002b0| 61 72 61 74 65 20 66 69 | 6c 65 20 70 6f 69 6e 74 |arate fi|le point|
|000002c0| 65 72 2e 20 20 48 6f 77 | 65 76 65 72 2c 20 61 73 |er. How|ever, as|
|000002d0| 0a 3e 73 6f 6f 6e 20 61 | 73 20 49 20 72 65 61 64 |.>soon a|s I read|
|000002e0| 20 61 20 6c 69 6e 65 20 | 66 72 6f 6d 20 74 68 65 | a line |from the|
|000002f0| 20 73 65 63 6f 6e 64 20 | 66 69 6c 65 2c 20 74 68 | second |file, th|
|00000300| 65 20 66 69 72 73 74 20 | 66 69 6c 65 20 70 6f 69 |e first |file poi|
|00000310| 6e 74 65 72 0a 3e 73 6f | 6d 65 68 6f 77 20 67 65 |nter.>so|mehow ge|
|00000320| 74 73 20 64 65 73 74 72 | 6f 79 65 64 20 61 6e 64 |ts destr|oyed and|
|00000330| 20 73 65 74 20 74 6f 20 | 73 6f 6d 65 20 70 6f 73 | set to |some pos|
|00000340| 69 74 69 6f 6e 20 69 6e | 20 74 68 65 20 6e 65 77 |ition in| the new|
|00000350| 6c 79 0a 3e 6f 70 65 6e | 65 64 20 66 69 6c 65 2e |ly.>open|ed file.|
|00000360| 20 20 48 61 73 20 61 6e | 79 6f 6e 65 20 65 6c 73 | Has an|yone els|
|00000370| 65 20 65 6e 63 6f 75 6e | 74 65 72 65 64 20 74 68 |e encoun|tered th|
|00000380| 69 73 3f 20 20 41 6e 64 | 20 69 66 20 73 6f 2c 0a |is? And| if so,.|
|00000390| 3e 69 73 20 74 68 65 72 | 65 20 61 20 73 6f 6c 75 |>is ther|e a solu|
|000003a0| 74 69 6f 6e 3f 20 28 69 | 2e 65 2e 20 41 20 77 61 |tion? (i|.e. A wa|
|000003b0| 79 20 74 6f 20 70 72 6f | 74 65 63 74 20 74 68 65 |y to pro|tect the|
|000003c0| 20 66 69 72 73 74 20 66 | 69 6c 65 20 70 6f 69 6e | first f|ile poin|
|000003d0| 74 65 72 0a 3e 66 72 6f | 6d 20 62 65 69 6e 67 20 |ter.>fro|m being |
|000003e0| 6f 76 65 72 77 72 69 74 | 74 65 6e 2e 29 0a 3e 0a |overwrit|ten.).>.|
|000003f0| 3e 48 65 72 65 20 61 72 | 65 20 74 68 65 20 73 74 |>Here ar|e the st|
|00000400| 65 70 73 20 49 20 61 6d | 20 70 65 72 66 6f 72 6d |eps I am| perform|
|00000410| 69 6e 67 3a 0a 3e 0a 3e | 76 6f 69 64 20 6d 61 69 |ing:.>.>|void mai|
|00000420| 6e 28 29 0a 0a 54 68 65 | 20 66 75 6e 63 74 69 6f |n()..The| functio|
|00000430| 6e 20 6d 61 69 6e 28 29 | 20 6d 75 73 74 20 72 65 |n main()| must re|
|00000440| 74 75 72 6e 20 61 6e 20 | 69 6e 74 2e 20 42 79 20 |turn an |int. By |
|00000450| 64 65 63 6c 61 72 69 6e | 67 20 6d 61 69 6e 28 29 |declarin|g main()|
|00000460| 20 61 73 20 72 65 74 75 | 72 6e 69 6e 67 20 76 6f | as retu|rning vo|
|00000470| 69 64 20 79 6f 75 20 0a | 61 72 65 20 69 6e 74 72 |id you .|are intr|
|00000480| 6f 64 75 63 69 6e 67 20 | 22 75 6e 64 65 66 69 6e |oducing |"undefin|
|00000490| 65 64 20 62 65 68 61 76 | 69 6f 75 72 22 2e 20 54 |ed behav|iour". T|
|000004a0| 68 69 73 20 6d 65 61 6e | 73 20 61 6e 79 74 68 69 |his mean|s anythi|
|000004b0| 6e 67 20 63 6f 75 6c 64 | 20 68 61 70 70 65 6e 2e |ng could| happen.|
|000004c0| 2e 2e 20 74 68 65 20 0a | 70 72 6f 67 72 61 6d 20 |.. the .|program |
|000004d0| 63 6f 75 6c 64 20 72 75 | 6e 20 66 69 6e 65 2e 20 |could ru|n fine. |
|000004e0| 49 74 20 63 6f 75 6c 64 | 20 72 65 66 6f 72 6d 61 |It could| reforma|
|000004f0| 74 20 79 6f 75 72 20 68 | 61 72 64 20 64 72 69 76 |t your h|ard driv|
|00000500| 65 20 6f 72 20 69 74 20 | 63 6f 75 6c 64 20 74 72 |e or it |could tr|
|00000510| 61 73 68 20 66 69 6c 65 | 20 0a 70 6f 69 6e 74 65 |ash file| .pointe|
|00000520| 72 73 2e 20 39 39 25 20 | 6f 66 20 74 68 65 20 74 |rs. 99% |of the t|
|00000530| 69 6d 65 20 69 74 20 72 | 75 6e 73 20 66 69 6e 65 |ime it r|uns fine|
|00000540| 20 73 6f 20 74 68 69 73 | 20 69 73 20 70 72 6f 62 | so this| is prob|
|00000550| 61 62 6c 79 20 6e 6f 74 | 20 79 6f 75 72 20 70 72 |ably not| your pr|
|00000560| 6f 62 6c 65 6d 2e 20 42 | 55 54 20 79 6f 75 20 0a |oblem. B|UT you .|
|00000570| 73 68 6f 75 6c 64 20 63 | 68 61 6e 67 65 20 74 68 |should c|hange th|
|00000580| 69 73 20 74 6f 20 62 65 | 20 63 6f 72 72 65 63 74 |is to be| correct|
|00000590| 0a 0a 3e 7b 0a 3e 20 20 | 20 20 46 49 4c 45 20 2a |..>{.> | FILE *|
|000005a0| 46 69 6c 65 31 3b 0a 3e | 20 20 20 20 46 49 4c 45 |File1;.>| FILE|
|000005b0| 20 2a 46 69 6c 65 32 3b | 0a 3e 0a 3e 20 20 20 20 | *File2;|.>.> |
|000005c0| 46 69 6c 65 31 20 3d 20 | 20 20 66 6f 70 65 6e 28 |File1 = | fopen(|
|000005d0| 22 46 49 4c 45 4e 41 4d | 45 22 2c 20 22 72 2b 22 |"FILENAM|E", "r+"|
|000005e0| 29 3b 0a 0a 57 68 65 72 | 65 20 69 73 20 79 6f 75 |);..Wher|e is you|
|000005f0| 72 20 65 72 72 6f 72 20 | 63 68 65 63 6b 69 6e 67 |r error |checking|
|00000600| 3f 20 48 6f 77 20 64 6f | 20 79 6f 75 20 6b 6e 6f |? How do| you kno|
|00000610| 77 20 74 68 61 74 20 74 | 68 69 73 20 66 69 6c 65 |w that t|his file|
|00000620| 20 6f 70 65 6e 65 64 20 | 6f 6b 61 79 3f 0a 0a 3e | opened |okay?..>|
|00000630| 20 20 20 20 2f 2a 20 6c | 6f 6f 70 20 74 68 72 6f | /* l|oop thro|
|00000640| 75 67 68 20 6c 69 6e 65 | 73 20 69 6e 20 46 69 6c |ugh line|s in Fil|
|00000650| 65 31 20 75 73 69 6e 67 | 20 66 67 65 74 73 28 29 |e1 using| fgets()|
|00000660| 20 2a 2f 0a 3e 0a 3e 20 | 20 20 20 69 66 20 28 43 | */.>.> | if (C|
|00000670| 6f 6e 64 69 74 69 6f 6e | 29 20 2f 2a 20 6a 75 73 |ondition|) /* jus|
|00000680| 74 20 69 6e 64 69 63 61 | 74 69 6e 67 20 73 6f 6d |t indica|ting som|
|00000690| 65 20 63 6f 6e 64 69 74 | 69 6f 6e 20 77 61 73 20 |e condit|ion was |
|000006a0| 6d 65 74 20 2a 2f 0a 3e | 20 20 20 20 7b 0a 3e 20 |met */.>| {.> |
|000006b0| 20 20 20 20 20 20 20 46 | 69 6c 65 32 20 3d 20 66 | F|ile2 = f|
|000006c0| 6f 70 65 6e 28 22 46 49 | 4c 45 4e 41 4d 45 32 22 |open("FI|LENAME2"|
|000006d0| 2c 20 22 72 2b 22 29 3b | 0a 0a 4e 6f 20 65 72 72 |, "r+");|..No err|
|000006e0| 6f 72 20 63 68 65 63 6b | 69 6e 67 20 61 67 61 69 |or check|ing agai|
|000006f0| 6e 2e 20 44 6f 20 73 6f | 6d 65 20 65 72 72 6f 72 |n. Do so|me error|
|00000700| 20 63 68 65 63 6b 69 6e | 67 2e 20 54 68 61 74 20 | checkin|g. That |
|00000710| 6a 75 73 74 20 6d 69 67 | 68 74 20 62 65 20 79 6f |just mig|ht be yo|
|00000720| 75 72 20 70 72 6f 62 6c | 65 6d 2e 0a 0a 3e 20 20 |ur probl|em...> |
|00000730| 20 20 20 20 20 20 66 67 | 65 74 73 28 4c 69 6e 65 | fg|ets(Line|
|00000740| 2c 20 46 69 6c 65 32 29 | 3b 20 3c 2d 2d 2d 2d 2d |, File2)|; <-----|
|00000750| 20 41 73 20 73 6f 6f 6e | 20 61 73 20 74 68 69 73 | As soon| as this|
|00000760| 20 6f 63 63 75 72 73 2c | 20 46 69 6c 65 31 20 67 | occurs,| File1 g|
|00000770| 65 74 73 0a 3e 20 20 20 | 20 20 20 20 20 20 20 20 |ets.> | |
|00000780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 77 | | w|
|000007a0| 69 70 65 64 20 6f 75 74 | 2e 20 20 57 68 79 3f 0a |iped out|. Why?.|
|000007b0| 0a 54 68 69 73 20 65 78 | 61 6d 70 6c 65 20 69 73 |.This ex|ample is|
|000007c0| 20 6f 62 76 69 6f 75 73 | 6c 79 20 6e 6f 74 20 74 | obvious|ly not t|
|000007d0| 68 65 20 72 65 61 6c 20 | 70 72 6f 67 72 61 6d 2e |he real |program.|
|000007e0| 20 59 6f 75 20 68 61 76 | 65 20 6e 6f 74 20 64 65 | You hav|e not de|
|000007f0| 66 69 6e 65 64 20 77 68 | 61 74 20 4c 69 6e 65 20 |fined wh|at Line |
|00000800| 69 73 2e 20 0a 49 74 20 | 63 6f 75 6c 64 20 62 65 |is. .It |could be|
|00000810| 20 70 6f 73 73 69 62 6c | 65 20 74 68 61 74 20 79 | possibl|e that y|
|00000820| 6f 75 20 68 61 76 65 20 | 69 6d 70 72 6f 70 65 72 |ou have |improper|
|00000830| 6c 79 20 64 65 63 6c 61 | 72 65 64 20 74 68 65 20 |ly decla|red the |
|00000840| 76 61 72 69 61 62 6c 65 | 20 4c 69 6e 65 20 61 6e |variable| Line an|
|00000850| 64 20 0a 61 63 63 65 73 | 73 69 6e 67 20 4c 69 6e |d .acces|sing Lin|
|00000860| 65 20 69 73 20 74 72 61 | 73 68 69 6e 67 20 6d 65 |e is tra|shing me|
|00000870| 6d 6f 72 79 2e 20 54 68 | 65 20 76 61 72 69 61 62 |mory. Th|e variab|
|00000880| 6c 65 20 46 69 6c 65 31 | 20 6d 69 67 68 74 20 62 |le File1| might b|
|00000890| 65 20 63 6c 6f 73 65 20 | 74 6f 20 4c 69 6e 65 20 |e close |to Line |
|000008a0| 73 6f 20 69 74 20 0a 67 | 65 74 73 20 74 72 61 73 |so it .g|ets tras|
|000008b0| 68 21 0a 0a 49 66 20 79 | 6f 75 20 70 6f 73 74 20 |h!..If y|ou post |
|000008c0| 61 20 63 75 74 20 64 6f | 77 6e 20 76 65 72 73 69 |a cut do|wn versi|
|000008d0| 6f 6e 20 6f 66 20 74 68 | 65 20 70 72 6f 62 6c 65 |on of th|e proble|
|000008e0| 6d 20 63 6f 64 65 20 79 | 6f 75 20 73 68 6f 75 6c |m code y|ou shoul|
|000008f0| 64 20 74 65 73 74 20 74 | 68 65 20 63 75 74 20 64 |d test t|he cut d|
|00000900| 6f 77 6e 20 0a 76 65 72 | 73 69 6f 6e 20 74 6f 20 |own .ver|sion to |
|00000910| 73 65 65 20 69 66 20 69 | 74 20 66 61 69 6c 73 20 |see if i|t fails |
|00000920| 74 6f 6f 2e 20 49 66 20 | 74 68 65 20 63 75 74 20 |too. If |the cut |
|00000930| 64 6f 77 6e 20 76 65 72 | 73 69 6f 6e 20 64 6f 65 |down ver|sion doe|
|00000940| 73 20 6e 6f 74 20 66 61 | 69 6c 20 74 68 65 6e 20 |s not fa|il then |
|00000950| 79 6f 75 20 68 61 76 65 | 20 0a 6e 6f 74 20 69 6e |you have| .not in|
|00000960| 63 6c 75 64 65 64 20 65 | 6e 6f 75 67 68 20 69 6e |cluded e|nough in|
|00000970| 66 6f 72 6d 61 74 69 6f | 6e 20 74 6f 20 6c 65 74 |formatio|n to let|
|00000980| 20 75 73 20 68 65 6c 70 | 20 79 6f 75 2e 0a 0a 3e | us help| you...>|
|00000990| 20 20 20 20 7d 0a 0a 49 | 6e 73 65 72 74 20 61 20 | }..I|nsert a |
|000009a0| 72 65 74 75 72 6e 28 30 | 29 3b 20 73 74 61 74 65 |return(0|); state|
|000009b0| 6d 65 6e 74 20 68 65 72 | 65 2e 0a 0a 3e 7d 0a 0a |ment her|e...>}..|
|000009c0| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+